<% layout('/layouts/default.html', {title: '任务过程审核-普通任务部署审核', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<#form:form id="inputForm" model="${dcSupTaskAudit}" action="${ctx}/audit/dcSupTaskAudit/save" method="post" class="form-horizontal">
			<div class="box-body">
				<div class="form-unit">${text('任务信息')}</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">${text('任务年度')}：</label>
							<div class="col-sm-8">
								<label class="control-label " title="">${dcSupTaskAudit.dcSupTaskInfo.taskYear}年</label>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">${text('任务类型')}：</label>
							<div class="col-sm-8">
								<label class="control-label " title="" style="text-align: left">${dcSupTaskAudit.dcSupTaskInfo.taskTypeName}</label>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">${text('任务标题')}：</label>
							<div class="col-sm-8">
								<label class="control-label " title="" style="text-align: left;white-space: pre-line;">${text(dcSupTaskAudit.dcSupTaskInfo.taskTitle)}</label>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">${text('任务内容')}：</label>
							<div class="col-sm-8">
								<label class="control-label " title="" style="text-align: left;white-space: pre-line;">${text(dcSupTaskAudit.dcSupTaskInfo.taskContent)}</label>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">${text('起止时间')}：</label>
							<div class="col-sm-8">
								<label class="control-label " title="" style="text-align: left">${text(@DateUtils.formatDate(dcSupTaskAudit.dcSupTaskInfo.taskStartTime,'yyyy-MM-dd HH:mm'))}</label>
								至
								<label class="control-label " title="" style="text-align: left">${text(@DateUtils.formatDate(dcSupTaskAudit.dcSupTaskInfo.taskEndTime,'yyyy-MM-dd HH:mm'))}</label>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('督办要求')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<label class="control-label" title="" style="text-align: left;white-space: pre-line;">${dcSupTaskAudit.dcSupTaskInfo.taskRequireName!'无'}</label>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">${text('牵头领导')}：</label>
							<div class="col-sm-8">
								<label class="control-label " title="" style="text-align: left">${dcSupTaskAudit.dcSupTaskInfo.taskLeaderName!'无'}</label>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">${text('牵头责任单位')}：</label>
							<div class="col-sm-8">
								<label class="control-label " title="" style="text-align: left">${dcSupTaskAudit.dcSupTaskInfo.taskLeaderOrgName!'无'}</label>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">${text('联系人')}：</label>
							<div class="col-sm-8">
								<label class="control-label " title="" style="text-align: left">${dcSupTaskAudit.dcSupTaskInfo.contactName!'无'}</label>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">${text('联系电话')}：</label>
							<div class="col-sm-8">
								<label class="control-label " title="" style="text-align: left">${dcSupTaskAudit.dcSupTaskInfo.contactPhone!'无'}</label>
							</div>
						</div>
					</div>
					<% if(dcSupTaskAudit.auditType == '1'){ %>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">${text('反馈要求')}：</label>
							<div class="col-sm-8">
								<label class="control-label " title="" style="text-align: left;white-space: pre-line;">${dcSupTaskAudit.dcSupTaskInfo.feedbackWay!'无'}</label>
							</div>
						</div>
					</div>
					<% } %>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('督办字号')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<label class="control-label " title="" style="text-align: left">${dcSupTaskAudit.dcSupTaskInfo.messageNumber!'无'}</label>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2">
								<span class="required hide">*</span> ${text('附件上传')}：</label>
							<div class="col-sm-10">
								<#form:fileupload id="uploadFile" bizKey="${dcSupTaskAudit.dcSupTaskInfo.id}" bizType="dcSupTaskInfo_file"
								uploadType="all" class="" readonly="true" preview="true"/>
							</div>
						</div>
					</div>
				</div>
				<#form:hidden path="id"/>
				<#form:hidden path="targetId"/>
				<#form:hidden path="targetType"/>
				<#form:hidden path="dcSupTaskInfo.id"/>
				<#form:hidden path="dcSupTaskInfo.createBy"/>
				<div class="form-unit">${text('审核信息')}</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('审核结果')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:radio path="auditResult" dictType="dc_audit_result" defaultValue="1"  class="form-control required"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('审核意见')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-10">
								<#form:textarea path="auditOption" rows="4" class="form-control" style="white-space: pre-line;"/>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<% if (hasPermi('audit:dcSupTaskAudit:edit')){ %>
							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('提 交')}</button>&nbsp;
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});


$('#auditResult').on('ifChecked', function(){
	if($('#auditResult input:radio:checked').val()=='2') {
		$('#auditOption').addClass("required")
	}else{
		$('#auditOption').removeClass("required")
	}
});



</script>